package lntu;

import java.util.Scanner;

public class StudentTest {
    public static void main(String[] args) {
        Student stu1 = new Student();
//        Scanner sc = new Scanner(System.in);
//        System.out.println("请输入姓名：");
//        stu1.name = sc.next();
//        System.out.println("请输入年龄：");
//        stu1.age = sc.nextInt();
//        System.out.println("请输入学位：");
//        stu1.degree = sc.next();
//        sc.close();
//        stu1.Show();

        //变量赋值：姓名、年龄、学位 -->变量名.属性名=值
        stu1.name = "ningwei";
        stu1.age = 3;
        stu1.degree = "工学学士";
        //调用学生对象Show()-->对象名.方法名
        stu1.Show();

        Student stu2 = new Student();
        stu2.name = "李四";
        stu2.age = 30;
        stu2.degree = "硕士学位";
        stu2.Show();
    }
}
